<div class="TypeAD_box">
    <style type="text/css">
        .wrap{float:left;width:14px; padding: 0 8px; font-size: 26px;}
        .wrap a:hover{text-decoration: none;}
    </style>
    <!---->
    <div class="TypeAD_type">
        <dl>
            <dt><i>分类：</i> <a class ="{:hover_css( 0, 'cat' )}" href="{:urlParamChange('cid', $_GET['cid'], '')}">全部</a></dt>
            <dd>
            <volist name="cat" id="cat">
                <a class ="{:hover_css( $cat['cat_id'], 'cat' )}" href="{:urlParamChange('cid', $_GET['cid'], $cat['cat_id'])}">{$cat.name}</a>
            </volist>
            </dd>
        </dl>
        <dl>
            <dt><i>地区：</i> <a href="{:urlParamChange('aid', $_GET['aid'], '')}" class="{:hover_css( 0, 'area' )}">全部</a></dt>
            <dd>
            <volist name="area" id="ar">
                <a class ="{:hover_css( $ar['area_id'], 'area' )}" href="{:urlParamChange('aid', $_GET['aid'], $ar['area_id'])}">{$ar.name}</a>
            </volist>
            </dd>
        </dl>
        <a href="{:U('User/Catad/fabu')}" class="but" title="免费发货"></a>
    </div>
    <div class="clear"></div>
    <div class="TypeAD_box_list2">
        <ul class="TypeAD_title" id="left_cat">
            <volist name="left" id="lt" key="k">
                <li id="left_cat_{$k}" data-key="{$k}" data-value="{$lt['cat_id']}" class="<if condition="$lt['cat_id'] eq $_REQUEST['ccid'] || (!$_REQUEST['ccid'] && $k==1)">hover</if> <if condition="$k eq count($left)">end</if>">
                  <table border="0">
                      <tr>
                          <td valign="middle"><div class="wrap"><a href="{:urlParamChange('ccid', $_GET['ccid'], $lt['cat_id'])}">{$lt.name}</a></div></td>
                      </tr>
                  </table>
              </li>
            </volist>
        </ul>
        <ul class="TypeAD_list">
            <volist name="data.list" id="ls" mod="2">
            <li><if condition="$ls['article_id'] != 0"><a href="{:U('Page/show', array('pid'=>$ls['article_id']))}"><elseif condition="$ls['link_id']"/><a href="{:U('Link/jump', array('id'=>$ls['link_id']))}"><else/><a onclick="showmsg('该分类广告 未发布连接地址或者次级页面')"/></if><img <eq name="mod" value="1">class="rignt_img"</eq>height="124" width="476" src="{$ls.main_img_url}"/></a></li>
            </volist>
        </ul>
    </div>
    <div class="clear"></div>   
    <div class="paginationa">
        {$data.page}
    </div>
    <!---->
    <div class="clear"></div>
</div>
<script type="text/javascript">
    function setTpDiv(){
        var ccid = {$_REQUEST.ccid|intval};
        var ckey;
        var tpkey;
        ccid = (ccid == 0)? 999999999: ccid;
        $("#left_cat li").each(function(){
            ckey = $(this).attr('data-value');
            if(ckey == ccid){
                tpkey = $(this).attr('data-key');
                $(".TypeAD_list li:eq("+ 2*(tpkey-1)+")").addClass("on");
                $(".TypeAD_list li:eq("+ (2*(tpkey-1)+1)+")").addClass("on");
                tpkey--;
                if(tpkey >=1){
                    $("#left_cat_"+tpkey).addClass('tp');
                }
            }
        });
    }
    $(function(){setTpDiv()});
</script>